package top.zackyoung.bbs.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.zackyoung.bbs.entity.Like;
import top.zackyoung.bbs.entity.Pagination;

import java.util.List;

@Mapper
@Repository
public interface LikeMapper {
    int queryLikeCount(@Param("userId") Integer userId, @Param("type") Integer type, @Param("likeObjectId") Integer likeObjectId);

    // 点赞
    int insertLike(@Param("userId") Integer userId, @Param("type") Integer type, @Param("likeObjectId") Integer likeObjectId);
    List<Like> queryMyLike(Pagination pagination);
    int deleteLike(@Param("id") Integer id, @Param("userId") Integer userId);
}